package Queue.priorityQueue;

import java.time.LocalDate;
import java.util.PriorityQueue;

public class PriorityQueueTest {
    public static void main(String[] args) {
        var pq=new PriorityQueue<LocalDate>();
        pq.add(LocalDate.of(2021,5,9));
        pq.add(LocalDate.of(2000,10,23));
        System.out.println("Iterating over elements...");
        for(LocalDate date:pq){
            System.out.println(date);
        }
        System.out.println("Removing elements...");
        while(!pq.isEmpty()){
            System.out.println(pq.remove()) ;
        }

    }
}
